#ifndef __BUZZER_H__
#define __BUZZER_H__

#include <stm32f10x.h>
#include <stm32f10x_rcc.h>
#include <stm32f10x_gpio.h>
#include <stm32f10x_exti.h>
#include <stm32f10x_tim.h>
#include <misc.h>
#include <stdio.h>

#define DO_M  100000/523
#define RE_M  100000/587    
#define MI_M  100000/659
#define FA_M  100000/698
#define SO_M  100000/784
#define LA_M  100000/880
#define SI_M  100000/988


void timer2_init(void);
void timer2_start(void);
void timer2_stop(void);

void buzzer_init(void);
void buzzer_set_fre(uint16_t freq);

void buzzer_off(void);
void buzzer_on(void);

void servo_init(void);
void servo_set_0(void);
void servo_set_360(void);

#endif
